package models

type LoginUserModel struct {
	Username string `json:"username"`
	Password string `json:"password"`
}

func (l *LoginUserModel) TableName() string {
	return "login_user"
}

func NewLoginUserModel(fs ...func(l *LoginUserModel)) *LoginUserModel {
	l := new(LoginUserModel)
	for _, f := range fs {
		f(l)
	}
	return l
}

func WithUsername(name string) func(l *LoginUserModel) {
	return func(l *LoginUserModel) {
		l.Username = name
	}
}

func WithPassword(pwd string) func(l *LoginUserModel) {
	return func(l *LoginUserModel) {
		l.Password = pwd
	}
}
